package com.ruoyi.slope.inspection.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.inspection.mapper.SlopeInspectionCollapseMapper;
import com.ruoyi.slope.inspection.domain.SlopeInspectionCollapse;
import com.ruoyi.slope.inspection.service.ISlopeInspectionCollapseService;

/**
 * 塌方源观察巡检Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-05
 */
@Service
public class SlopeInspectionCollapseServiceImpl implements ISlopeInspectionCollapseService 
{
    @Autowired
    private SlopeInspectionCollapseMapper slopeInspectionCollapseMapper;

    /**
     * 查询塌方源观察巡检
     * 
     * @param id 塌方源观察巡检主键
     * @return 塌方源观察巡检
     */
    @Override
    public SlopeInspectionCollapse selectSlopeInspectionCollapseById(Long id)
    {
        return slopeInspectionCollapseMapper.selectSlopeInspectionCollapseById(id);
    }

    /**
     * 查询塌方源观察巡检列表
     * 
     * @param slopeInspectionCollapse 塌方源观察巡检
     * @return 塌方源观察巡检
     */
    @Override
    public List<SlopeInspectionCollapse> selectSlopeInspectionCollapseList(SlopeInspectionCollapse slopeInspectionCollapse)
    {
        return slopeInspectionCollapseMapper.selectSlopeInspectionCollapseList(slopeInspectionCollapse);
    }

    /**
     * 新增塌方源观察巡检
     * 
     * @param slopeInspectionCollapse 塌方源观察巡检
     * @return 结果
     */
    @Override
    public int insertSlopeInspectionCollapse(SlopeInspectionCollapse slopeInspectionCollapse)
    {
        slopeInspectionCollapse.setCreateTime(DateUtils.getNowDate());
        return slopeInspectionCollapseMapper.insertSlopeInspectionCollapse(slopeInspectionCollapse);
    }

    /**
     * 修改塌方源观察巡检
     * 
     * @param slopeInspectionCollapse 塌方源观察巡检
     * @return 结果
     */
    @Override
    public int updateSlopeInspectionCollapse(SlopeInspectionCollapse slopeInspectionCollapse)
    {
        slopeInspectionCollapse.setUpdateTime(DateUtils.getNowDate());
        return slopeInspectionCollapseMapper.updateSlopeInspectionCollapse(slopeInspectionCollapse);
    }

    /**
     * 批量删除塌方源观察巡检
     * 
     * @param ids 需要删除的塌方源观察巡检主键
     * @return 结果
     */
    @Override
    public int deleteSlopeInspectionCollapseByIds(Long[] ids)
    {
        return slopeInspectionCollapseMapper.deleteSlopeInspectionCollapseByIds(ids);
    }

    /**
     * 删除塌方源观察巡检信息
     * 
     * @param id 塌方源观察巡检主键
     * @return 结果
     */
    @Override
    public int deleteSlopeInspectionCollapseById(Long id)
    {
        return slopeInspectionCollapseMapper.deleteSlopeInspectionCollapseById(id);
    }
}
